The first phase of [P 010 / Ming] wall building lasted from 1368 to 1449 when the Ming were defeated by the [G 12 / Mongols] at Tumu. Ming security until then had rested on its superior military reputation. Defence during this stage consisted of garrisons on the northern frontier and the fortification of important passes. These were dotted throughout the [G 22 / steppe].